#include <vector>
#include <String>
#include <QObject>

//for serialization
#include <fstream>
// include headers that implement a archive in simple text format
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>

class DIVA_VMStub;
class ExploreBotDialogStub;

class ExploreBot
{
private:
	friend class boost::serialization::access;
	template<class Archive>
	void serialize(Archive & ar, const unsigned int version)
	{
		ar & _startVMname;
		ar & _save;
		ar & _maxLevel;
		ar & _maxLevel;
		ar & _maxNum;
	}
public:
	ExploreBot(std::string botName, DIVA_VMStub* startVM,int level,int num, std::vector<std::string> selectRef);
	ExploreBot(std::string botName, std::string startVMname,int level,int num,std::vector<std::string> selectRef,bool save);
	ExploreBot(){};
	~ExploreBot();
	bool doExplor();
	std::string getVarname();
	std::string getName();
	std::string getMaxLevelString();
	std::string getMaxNumString();
	void setMaxLevelString(std::string );
	void setMaxNumString(std::string );
	int getLevel();
	int getNum();
	void setExAllref(bool i);
	std::vector<std::string> getRefs();
	bool getStats();
	void setDialog(ExploreBotDialogStub* ui);
	ExploreBotDialogStub* getDialog();
	bool saved();
	void setSaved(bool i);
	bool getTrigger();
	void setTrigger(bool i);
	std::vector<std::string> getSelectRef();
	std::string getMessage();



private:
	void d_expand(DIVA_VMStub* vm,int nc,int lc);
	void pickUpAllVMs();
	bool checkExplorRef(std::string refName);
	DIVA_VMStub* _startVM;
	std::string _startVMname;
	std::string _botName;
	std::string _maxLS;
	std::string _maxNS;
	std::string _message;
	bool _byVM;
	int _maxLevel;
	int _maxNum;
	bool _exallRef;
	bool _Success;
	bool _save;
	bool _isTrigger;
	ExploreBotDialogStub* _ui;
	std::vector<std::string> _selectRef;

};
// namespace boost {
// 	namespace serialization {
// 
// 		template<class Archive>
// 		void serialize(Archive & ar, ExploreBot & g, const unsigned int version)
// 		{
// 			ar & g._save;
// 			ar & g._maxNum;
// 			ar & g._maxLevel;
// 		}
// 
// 	} // namespace serialization
// } // namespace boost
